package com.guangyunl.f_while;
// 统计1-100之间的偶数个数
public class Demo04While {
    public static void main(String[] args) {
        int i = 1;
        int quantity = 0;
        while (i <= 100){
            if (i % 2 == 0){
                quantity++;
            }
            i++;
        }
        System.out.println("1-100之间的偶数个数为" + quantity); // quantity = 50
    }
}
